﻿@section header
{
    <link rel="stylesheet" href="/css/treetable.css" />
}
<blockquote class="layui-elem-quote news_search toolList">
    @Html.Action("MenuHeader", "Home")
</blockquote>

<div style="display: flex;">
    <ul id="tree" class="ztree" style="display: inline-block; width: 180px; padding: 10px; border: 1px solid #ddd; overflow: auto;"></ul>
    <table class="layui-table"
           lay-data="{height: 'full-80', page:true, id:'mainList'}"
           lay-filter="list"  lay-size="sm">
        <thead>
        <tr>
            <th lay-data="{checkbox:true, fixed: true}"></th>
            <th lay-data="{field:'Id', width:150}">Id</th>
            <th lay-data="{field:'ParentId', width:150}">work_run父流转公文ID 值大于0则这个是子流程，完成后或者要返回父流程</th>
            <th lay-data="{field:'ParentFlowStep', width:150}">父pid的flow_id中的第几步骤进入的,取回这个work_flow_step的child_over决定结束子流程的动作</th>
            <th lay-data="{field:'CacheRunId', width:150}">多个子流程时pid无法识别cache所以加这个字段pid>0</th>
            <th lay-data="{field:'FlowId', width:150}">流程id 正常流程</th>
            <th lay-data="{field:'CategoryId', width:150}">流程分类ID即公文分类ID</th>
            <th lay-data="{field:'RunName', width:150}">公文名称</th>
            <th lay-data="{field:'RunFlowId', width:150}">流转到什么流程 最新流程，查询优化，进入子流程时将简化查询，子流程与父流程同步</th>
            <th lay-data="{field:'RunFlowProcess', width:150}">流转到第几步</th>
            <th lay-data="{field:'AttIds', width:150}">公文附件ids</th>
            <th lay-data="{field:'EndTime', width:150}">结束时间</th>
            <th lay-data="{field:'Status', width:150}">公文导入的状态，0未审核，1通过,2不通过</th>
            <th lay-data="{field:'DateLine', width:150}">流程最终时间</th>
            <th lay-data="{field:'Description', width:150}">备注</th>
            <th lay-data="{field:'Disabled', width:150}">有效</th>
            <th lay-data="{field:'Delete', width:150}">删除标记</th>
            <th lay-data="{field:'CreateDate', width:150}">创建时间</th>
            <th lay-data="{field:'CreateUserId', width:150}">创建用户主键</th>
            <th lay-data="{field:'CreateUserName', width:150}">创建用户</th>
            <th lay-data="{field:'ModifyDate', width:150}">修改时间</th>
            <th lay-data="{field:'ModifyUserId', width:150}">修改用户主键</th>
            <th lay-data="{field:'ModifyUserName', width:150}">修改用户</th>
            <th lay-data="{fixed: 'right', width:160, align:'center', toolbar: '#barList'}"></th>
        </tr>
        </thead>
    </table>
</div>
<script type="text/html" id="barList">
    <a class="layui-btn layui-btn-primary layui-btn-mini" lay-event="detail">查看</a>
</script>

<!--用户添加/编辑窗口-->
<div id="divEdit" style="display: none">
    <form class="layui-form" action=""  id="formEdit">
    <input type="hidden" name="Id" v-model="Id" />
    <div class="layui-form-item">
        <label class="layui-form-label">work_run父流转公文ID 值大于0则这个是子流程，完成后或者要返回父流程</label>
        <div class="layui-input-block">
            <input type="text" name="ParentId" v-model="ParentId" required lay-verify="required"
                placeholder="work_run父流转公文ID 值大于0则这个是子流程，完成后或者要返回父流程" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">父pid的flow_id中的第几步骤进入的,取回这个work_flow_step的child_over决定结束子流程的动作</label>
        <div class="layui-input-block">
            <input type="text" name="ParentFlowStep" v-model="ParentFlowStep" required lay-verify="required"
                placeholder="父pid的flow_id中的第几步骤进入的,取回这个work_flow_step的child_over决定结束子流程的动作" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">多个子流程时pid无法识别cache所以加这个字段pid>0</label>
        <div class="layui-input-block">
            <input type="text" name="CacheRunId" v-model="CacheRunId" required lay-verify="required"
                placeholder="多个子流程时pid无法识别cache所以加这个字段pid>0" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">流程id 正常流程</label>
        <div class="layui-input-block">
            <input type="text" name="FlowId" v-model="FlowId" required lay-verify="required"
                placeholder="流程id 正常流程" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">流程分类ID即公文分类ID</label>
        <div class="layui-input-block">
            <input type="text" name="CategoryId" v-model="CategoryId" required lay-verify="required"
                placeholder="流程分类ID即公文分类ID" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公文名称</label>
        <div class="layui-input-block">
            <input type="text" name="RunName" v-model="RunName" required lay-verify="required"
                placeholder="公文名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">流转到什么流程 最新流程，查询优化，进入子流程时将简化查询，子流程与父流程同步</label>
        <div class="layui-input-block">
            <input type="text" name="RunFlowId" v-model="RunFlowId" required lay-verify="required"
                placeholder="流转到什么流程 最新流程，查询优化，进入子流程时将简化查询，子流程与父流程同步" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">流转到第几步</label>
        <div class="layui-input-block">
            <input type="text" name="RunFlowProcess" v-model="RunFlowProcess" required lay-verify="required"
                placeholder="流转到第几步" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公文附件ids</label>
        <div class="layui-input-block">
            <input type="text" name="AttIds" v-model="AttIds" required lay-verify="required"
                placeholder="公文附件ids" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">结束时间</label>
        <div class="layui-input-block">
            <input type="radio" name="EndTime" value="1" title="value1" checked>
            <input type="radio" name="EndTime" value="0" title="value2">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">公文导入的状态，0未审核，1通过,2不通过</label>
        <div class="layui-input-block">
            <input type="text" name="Status" v-model="Status" required lay-verify="required"
                placeholder="公文导入的状态，0未审核，1通过,2不通过" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">流程最终时间</label>
        <div class="layui-input-block">
            <input type="text" name="DateLine" v-model="DateLine" required lay-verify="required"
                placeholder="流程最终时间" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <input type="text" name="Description" v-model="Description" required lay-verify="required"
                placeholder="备注" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">有效</label>
        <div class="layui-input-block">
            <input type="radio" name="Disabled" value="1" title="value1" checked>
            <input type="radio" name="Disabled" value="0" title="value2">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">删除标记</label>
        <div class="layui-input-block">
            <input type="radio" name="Delete" value="1" title="value1" checked>
            <input type="radio" name="Delete" value="0" title="value2">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">创建时间</label>
        <div class="layui-input-block">
            <input type="text" name="CreateDate" v-model="CreateDate" required lay-verify="required"
                placeholder="创建时间" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">创建用户主键</label>
        <div class="layui-input-block">
            <input type="text" name="CreateUserId" v-model="CreateUserId" required lay-verify="required"
                placeholder="创建用户主键" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">创建用户</label>
        <div class="layui-input-block">
            <input type="text" name="CreateUserName" v-model="CreateUserName" required lay-verify="required"
                placeholder="创建用户" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">修改时间</label>
        <div class="layui-input-block">
            <input type="text" name="ModifyDate" v-model="ModifyDate" required lay-verify="required"
                placeholder="修改时间" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">修改用户主键</label>
        <div class="layui-input-block">
            <input type="text" name="ModifyUserId" v-model="ModifyUserId" required lay-verify="required"
                placeholder="修改用户主键" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">修改用户</label>
        <div class="layui-input-block">
            <input type="text" name="ModifyUserName" v-model="ModifyUserName" required lay-verify="required"
                placeholder="修改用户" autocomplete="off" class="layui-input">
        </div>
    </div>

<div class="layui-form-item">
    <label class="layui-form-label">所属部门</label>
    <div class="layui-input-block">
        <input id="Organizations" name="Organizations" v-model="Organizations" required lay-verify="required" class="layui-input" />
        <input id="OrganizationIds" name="OrganizationIds" v-model="OrganizationIds" required lay-verify="required" type="hidden" />
        <div id="menuContent" class="menuContent" style="display: none;">
            <ul id="org" class="ztree"></ul>
        </div>
    </div>
</div>

     <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formSubmit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
</div>

<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/userJs/FlowRuns.js"></script>


